  /* 输入框组件样式 */
.ac-input {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--color-border-2);
  border-radius: 8px;
  box-sizing: border-box;
  background: var(--color-bg-2);
  transition: all 0.2s ease;
  padding: 12px; /* 统一外框内边距，整体一个框 */
  min-height: 56px;

  &.ac-input-updown {
    .ac-input-footer {
      border-top: 1px solid var(--color-border-2);
    }
  }

  &.ac-input-disabled {
    background-color: var(--color-fill-1);
    cursor: not-allowed;
    color: var(--color-text-4);
    
  }

  &.ac-input-readonly {
    background-color: var(--color-fill-1);
  }

  &.ac-input-loading { opacity: 0.7; }

  &.ac-input-recording {
    border-color: var(--color-danger-6);
    box-shadow: 0 0 0 2px var(--color-danger-1);
  }
}

.ac-input-content {
  display: flex;
  align-items: center;
  background: transparent; /* 让整个组件只有一层外框 */
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  min-height: 32px;
  gap: 8px;
}

/* 让文本域占据剩余空间，避免被按钮挤压 */
.ac-input-textarea {
  flex: 1 1 auto;
  min-width: 0; /* 关键：允许在flex容器中收缩 */
}

/* 兼容 Arco 包裹层，确保宽度撑满 */
.ac-input-textarea .arco-textarea,
.ac-input-textarea .arco-textarea-wrapper {
  width: 100%;
  background: transparent;
}

/* 操作按钮不参与收缩，避免压缩输入区 */
.ac-submit-button,
.ac-clear-button {
  flex: 0 0 auto;
}

.ac-input:focus-within {
  color: rgb(var(--color-text-1));
  border-color: rgb(var(--primary-6));
  box-shadow: 0 0 0 2px var(--color-primary-1);
}

.ac-input-prefix, .ac-input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-input-prefix {
  margin-right: 8px;
}

.ac-input-suffix {
  margin-left: 8px;
}

.ac-input-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  padding: 0 8px;
}

.ac-input-foot-count {
  color: var(--color-text-3);
  font-size: var(--font-size-body-small);
}

.ac-input-disabled {
  background: var(--color-fill-2);
  color: var(--color-text-4);
  cursor: not-allowed;
}

/* 发送按钮样式 */
.ac-submit-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-left: 8px !important;
  margin-right: 8px !important;
  position: relative !important;
  overflow: hidden !important;

  &:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  }

  &:active:not(:disabled) {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
  }

  &:disabled {
    background: var(--color-fill-3) !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
  }

  /* 按钮内容 */
  .arco-btn-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: white !important;
  }

  /* 加载状态 */
  &.arco-btn-loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    
    .arco-btn-loading-icon {
      color: white !important;
    }
  }

  /* 图标样式 */
  .arco-icon {
    font-size: 16px !important;
    color: white !important;
  }
}

/* 清空按钮样式优化 */
.ac-clear-button {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--color-fill-3) !important;
  color: var(--color-text-3) !important;
  transition: all 0.2s ease !important;
  margin-left: 4px !important;
  margin-right: 4px !important;

  &:hover:not(:disabled) {
    background: var(--color-fill-4) !important;
    color: var(--color-text-2) !important;
    transform: scale(1.1) !important;
  }

  .arco-btn-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }
}